<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
    </head>
    <body>
        <a id="test"></a>
    </body>
    <script>
     test(function() {
         location.hash = "test";
         assert_equals(document.querySelector(":target"), document.getElementById("test"),
                       "Target shoud be the same with the test anchor!");
         location.hash = "";
         assert_equals(document.querySelector(":target"), null, "Target should be null!");
     });
    </script>
</html>
